﻿@{
    ViewBag.Title = "个人信息";
    Layout = "~/Areas/SystemManage/Views/Shared/_Layout.cshtml";
}
<link href="~/js/select2/select2.min.css" rel="stylesheet" />
<script src="~/js/select2/select2.min.js"></script>
<link href="~/js/wizard/wizard.css" rel="stylesheet" />
<script src="~/js/wizard/wizard.js"></script>
<script src="~/js/validate/jquery.validate.min.js"></script>
<style type="text/css">
    .select2-container--default .select2-selection--single {
        width: 300px
    }
</style>
<script>
    //$(function () {
    //    $('.wrapper').height($(window).height() - 11);
    //})
    var keyValue = $.request("keyValue");
    $(function () {
        initControl();
        if (!!keyValue) {
            $.ajax({
                url: "/SystemManage/Manager/GetFormJson",
                data: { keyValue: keyValue },
                dataType: "json",
                async: false,
                success: function (data) {
                    console.log(data);
                    $("#form1").formSerialize(data);
                    //$("#UserPassword").val("******").attr('disabled', 'disabled');
                }
            });
        }
    });
    function initControl() {
        $("#Gender").bindSelect()
        //$("#IsAdministrator").bindSelect()
        //$("#EnabledMark").bindSelect()
        $("#OrganizeId").bindSelect({
            url: "/SystemManage/SysOrganize/GetTreeSelectJson"
        });
        $("#DepartmentId").bindSelect({
            url: "/SystemManage/SysOrganize/GetTreeSelectJson",
        });
        $("#RoleId").bindSelect({
            url: "/SystemManage/SysRole/GetGridJson",
            id: "Id",
            text: "FullName"
        });
        $("#DutyId").bindSelect({
            url: "/SystemManage/SysDuty/GetGridJson",
            id: "Id",
            text: "FullName"
        });
    }
    function submitForm() {
        if (!$('#form1').formValid()) {
            return false;
        }
        $.submitForm({
            url: "/SystemManage/Manager/SubmitForm?keyValue=" + keyValue,
            param: $("#form1").formSerialize(),
            success: function () {
                $.modalMsg("修改成功！");
            }
        })
    }
</script>
<form id="form1">
    <div class="wrapper">
        <ul class="nav nav-tabs">
            <li class="active"><a href="#a" data-toggle="tab">基本信息</a></li>
            @*
                <li><a href="#b" data-toggle="tab">注册信息</a></li>
                <li><a href="#c" data-toggle="tab">安全验证</a></li>
                <li><a href="#c" data-toggle="tab">系统日志</a></li>
                <li><a href="#c" data-toggle="tab">个性化设置</a></li>*@
        </ul>
        <div class="tab-content" style="padding-top: 5px;">
            <div id="a" class="tab-pane active" style="padding: 15px;">
                <ul class="pop-list">
                    <li>
                        <label>账户</label>
                        <input type="text" class="form-control" name="Account" id="Account" />
                    </li>
                    <li>
                        <label>姓名</label>
                        <input type="text" class="form-control" name="RealName" id="RealName" />
                    </li>
                    <li>
                        <label>性别</label>
                        <select class="form-control" name="Gender" id="Gender">
                            <option value="true">男</option>
                            <option value="false">女</option>
                        </select>
                    </li>
                    <li>
                        <label>出生</label>
                        <input id="Birthday" name="Birthday" type="text" class="form-control input-wdatepicker" onfocus="WdatePicker()" />
                    </li>
                    <li>
                        <label>公司</label>
                        <select id="OrganizeId" name="OrganizeId" class="form-control required"></select>
                    </li>
                    <li>
                        <label>部门</label>
                        <select id="DepartmentId" name="DepartmentId" class="form-control required">
                            <option value="">==请选择==</option>
                        </select>
                    </li>
                    <li>
                        <label>通道</label>
                        <input type="text" class="form-control" name="LineNumber" id="LineNumber" />
                    </li>
                    <li>
                        <label>角色</label>
                        <select id="RoleId" name="RoleId" class="form-control required">
                            <option value="">==请选择==</option>
                        </select>
                    </li>
                    <li>
                        <label>岗位</label>
                        <select id="DutyId" name="DutyId" class="form-control required">
                            <option value="">==请选择==</option>
                        </select>
                    </li>
                    <li>
                        <label>自我介绍</label>
                        <textarea class="form-control" style="height: 60px;" name="Description" id="Description"></textarea>
                    </li>
                    <li class="line">
                        <h5><span>联系方式</span></h5>
                    </li>
                    <li>
                        <label>手机号码</label>
                        <input type="text" class="form-control" name="MobilePhone" id="MobilePhone" />
                    </li>
                    <li>
                        <label>电子邮箱</label>
                        <input type="text" class="form-control" name="Email" id="Email" />
                    </li>
                    <li>
                        <label>微信号</label>
                        <input type="text" class="form-control" name="WeChat" id="WeChat" />
                        <input name="EnabledMark" id="EnabledMark" value="1" type="hidden" />
                    </li>
                    <li>
                        <div style="padding-left: 115px;">
                            <a class="btn btn-primary" onclick="submitForm()"><i class="fa fa-save" style="margin-right:5px;"></i>确认修改</a>
                        </div>
                    </li>
                </ul>
            </div>
            @*<div id="b" class="tab-pane" style="padding: 15px;">
                    <ul class="pop-list">
                        <li>
                            <label>账户</label>
                            <input type="text" class="form-control" />
                        </li>
                        <li>
                            <label>密码</label>
                            <input type="text" class="form-control" />
                        </li>
                        <li>
                            <label>第一次访问时间</label>
                            <input type="text" class="form-control" />
                        </li>
                        <li>
                            <label>上一次访问时间</label>
                            <input type="text" class="form-control" />
                        </li>
                        <li>
                            <label>最后修改密码时间</label>
                            <input type="text" class="form-control" />
                        </li>
                        <li>
                            <label>登录时间</label>
                            <input type="text" class="form-control" />
                        </li>
                        <li>
                            <label>登录次数</label>
                            <input type="text" class="form-control" />
                        </li>
                        <li>
                            <label>账户类型</label>
                            <input type="text" class="form-control" />
                        </li>
                        <li class="line">
                            <h5><span>修改密码</span></h5>
                        </li>
                        <li>
                            <label>旧密码</label>
                            <input type="text" class="form-control" />
                        </li>
                        <li>
                            <label>新密码</label>
                            <input type="text" class="form-control" />
                        </li>
                        <li>
                            <label>确认新密码</label>
                            <input type="text" class="form-control" />
                        </li>
                        <li>
                            <div style="padding-left: 115px;">
                                <a class="btn btn-primary" onclick="btn_add()"><i class="fa fa-save" style="margin-right:5px;"></i>确认修改</a>
                            </div>

                        </li>
                    </ul>
                </div>
                <div id="c" class="tab-pane" style="padding-right: 15px;">
                    3
                </div>
                <div id="d" class="tab-pane" style="padding-right: 15px;">
                    4
                </div>*@
        </div>
    </div>
</form>
